<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBlogCategoryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     * 文章分类表
     */
    public function up()
    {
        Schema::create('blog_category', function (Blueprint $table) {
            $table->increments('cate_id')->comment('分类id');
            $table->string('cate_name',60)->unique()->comment('分类名称');
            $table->string('cate_title',60)->comment('分类别名');
            $table->integer('cate_order')->comment('排序');
            $table->integer('cate_pid')->comment('父id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('blog_category');
    }
}
